package com.jingyong.infosite.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.jingyong.infosite.dto.response.LoanGradeResponse;
import com.jingyong.infosite.service.LoanGradeService;

import io.swagger.annotations.Api;

/**
 * @author Hill Dong
 * @date 2018/1/23
 */
@RestController
@Api("评级接口")
public class GradeController {

	@Autowired
	private LoanGradeService loanGradeService;

	@RequestMapping(value = "/loan_grade", method = RequestMethod.GET)
	public LoanGradeResponse getLoanWikiHomePage() {
		return loanGradeService.getLoanGradeResponse();
	}

	@RequestMapping(value = "/loan_grade/{month}", method = RequestMethod.GET)
	public Object getLoanWikiByMonth(@PathVariable("month") String month) {
		return loanGradeService.getLoanGradeResponseByMonth(month);
	}
}
